package sjtu.ist.warehouse4ws.service;

import java.util.List;

import sjtu.ist.warehouse4ws.model.Privilege;
import sjtu.ist.warehouse4ws.tool.ListPage;
import sjtu.ist.warehouse4ws.vo.FullPrivilegeVO;

public interface PrivilegeService {
	Privilege get(String id);
	boolean save(Privilege privilege);
	void update(Privilege privilege);
	void delete(String id);
	void delete(Privilege privilege);
	List<Privilege> findByCompany(String companyId);
	List<Privilege> findByFileInfo(String fileInfoId);
	ListPage getAllPrivileges(int start,int limit);
	ListPage getAllFullPrivileges(int start,int limit);
	ListPage searchFullPrivilege(String fileName, String project, String version, Integer type, String department,String company,
			String owner,int start,int limit);
	Privilege findByOp(String fileInfoId,String companyId);
	void addPrivilegeForCompany(String companyId);
	boolean checkPrivilege(String fileId, String company, int userType, String op);
}
